﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StillDesign.PhysX;

namespace SimulationCore.Net.Misc
{
    internal class OutputStream : UserOutputStream 
    {
        public override void ReportError(ErrorCode errorCode, string message, string file, int lineNumber)
        {
            Console.WriteLine("PhysX Error: {0}; Message: {1}; File: {2}; Line: {3}",
                              errorCode,
                              message,
                              file,
                              lineNumber);
        }

        public override AssertResponse ReportAssertionViolation(string message, string file, int lineNumber)
        {
            Console.WriteLine("PhysX Assertion Violation. Message: {0}; File: {1}; Line: {2}",
                              message,
                              file,
                              lineNumber);

            //Todo: Dig into assertion thing.
            return AssertResponse.Ignore;
        }

        public override void Print(string message)
        {
            Console.WriteLine("PhysX Message: {0};", message);
        }
    }
}
